package com.fy.fyspace.controller;

import com.fy.fyspace.common.result.Result;
import com.fy.fyspace.service.LikePictureService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 图片点赞表 前端控制器
 * </p>
 *
 * @author fwq
 * @since 2025-06-26
 */
@Api(tags = "图片点赞模块")
@RestController
@RequestMapping("/likepicture")
public class LikePictureController {

    @Resource
    private LikePictureService likePictureService;

    /**
     * 批量点赞图片
     * @param picIds 图片ID列表，逗号分隔
     * @return 结果
     */
    @ApiOperation(value = "批量点赞图片", notes = "批量点赞图片，picIds为逗号分隔的图片ID字符串")
    @PostMapping("/like/batch")
    public Result batchLikePictures(
            @ApiParam(value = "图片ID列表，逗号分隔", required = true)
            @RequestParam String picIds) {
        return likePictureService.batchLikePictures(picIds);
    }
}
